import request from "@/utils/request";
/**
 * 获得个人分销信息
 */
export function getBrokerageUser() {
  return request.get(`trade/brokerage-user/get`, {}, { isYuDao: true });
}
/**
 * 获得个人分销统计
 */
export function getBrokerageUserSummary() {
  return request.get(`trade/brokerage-user/get-summary`, {}, { isYuDao: true });
}
/**
 * 获得分销记录分页
 */
export function getBrokerageRecordPage(params: any) {
  return request.get(`trade/brokerage-record/page`, params, { isYuDao: true });
}
/**
 * 获得分销记录分页
 */
export function getProductBrokeragePrice(params: any) {
  return request.get(`trade/brokerage-record/get-product-brokerage-price`, params, { isYuDao: true });
}
/**
 * 获得下级分销统计分页
 */
export function getBrokerageUserChildSummaryPage(params: any) {
  return request.get(`trade/brokerage-user/child-summary-page`, params, { isYuDao: true });
}
/**
 * 获得分销用户排行分页（基于佣金）
 */
export function getBrokerageUserChildSummaryPageByPrice(params: any) {
  return request.get(`trade/brokerage-user/rank-page-by-price`, params, { isYuDao: true });
}
// 获得分销用户排行（基于佣金）
export function getRankByPrice(params: any) {

  return request.get(`trade/brokerage-user/get-rank-by-price`, params, { isYuDao: true });
}
// 获得分销用户排行（基于用户量）
export function getBrokerageUserRankPageByUserCount(params: any) {
  return request.get(`trade/brokerage-user/rank-page-by-user-count`, params, { isYuDao: true });
}
/**
 * 查询交易配置
 */
export function getTradeConfig() {
  return request.get('trade/config/get', {}, { isYuDao: true })
}
/**
 * 申请余额提现
 */
export function cashOutApply(data: AnyObject) {
  return request.post('trade/brokerage-withdraw/create', data, { showSuccessMessage: true, showErrorMessage: true, isYuDao: true })

}
